Dev/errors - #162
Conversation
There was a problem hiding this comment.
Code Review
This pull request enhances error handling, response validation, and compatibility across the DashScope CLI and SDK, including mapping SDK errors to CLI-friendly codes and adding unit tests. The review feedback highlights several critical issues where the new validation logic strictly assumes dictionary outputs, which will cause runtime crashes or failures when API responses are objects. It is recommended to update these checks to dynamically support both dictionary and object formats.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
AgentStudio exceptions now converge onto dashscope.common.error_registry
(the single source of truth shared with the Java SDK). from_response
normalizes the server code to the unified Anthropic-compatible taxonomy
(rewriting legacy aliases, preserving specific registry codes like
billing_error, falling back to the per-status row when the server omits
one) so .code is always unified; the raw payload stays on .raw. Default
messages are sourced from the registry with unresolved {var} placeholders
stripped, fixing a 404 placeholder leak and a 504 code/message mismatch.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…rd SDK exceptions
Description
[Describe what this PR does and why]
Related Issue: Fixes #[issue_number] or Relates to #[issue_number]
Security Considerations: [Check if API keys or sensitive credentials are exposed in code/logs]
Type of Change
Component(s) Affected
Checklist
Testing
[How to test these changes]
Additional Notes
[Optional: any other context]